package com.example.demo.interceptor;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.LocaleResolver;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class InterceptorConfigurer implements WebMvcConfigurer {
	@Autowired
	LocaleResolver myLocaleResolver;

	/**
	 * 国际化组件
	 * 
	 * @return
	 */
	@Bean
	public LocaleResolver localeResolver() {
		return myLocaleResolver;
	}
}
